package com.itheima.sh.bulk.controller;


import com.itheima.sh.bulk.service.SkuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.io.IOException;

/**
 * <p>
 * 商品表 前端控制器
 * </p>
 *
 * @author hl
 * @since 2020-12-29
 */
@RestController
@RequestMapping("/sku")
public class SkuController {
    @Autowired
    private SkuService skuService;

    @GetMapping("/bulk")
    public Long insertData() throws IOException, InterruptedException {
        return  skuService.createIndexAndBulkInsertData();
    }
}
